home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 3
/
Light ROM 3 - Disc 2.iso
/
programs
/
amiga
/
dps
/
par252.lha
/
rexx
/
CopyAll.ddr
< prev
next >
Wrap
Text File
|
1995-01-11
|
1KB
|
53 lines
/* Program to copy all contents of one PAR drive to another */
/* Needs version 2.06 of Amiga PAR */
/* DD0: refers to source drive, and DD1: is slave*/
/* */
address DDR
address command 'list > ram:temp DD1: LFORMAT "%s"'
file_list1 = 'ram:temp'
if open('myfile',file_list1,'READ') then do
do while ~EOF('myfile')
ff_name = readln('myfile')
/* address command 'makedir DD0:'||ff_name */
end
call close('myfile')
end
else
say 'no open file'
address command 'list > ram:temp DD1: LFORMAT "%P%N" all files'
address command 'sort ram:temp ram:temp2'
address command 'copy ram:temp2 ram:temp'
file_list = 'ram:temp'
if open('myfile',file_list,'READ') then do
do while ~EOF('myfile')
ff_name = readln('myfile')
ff_name_len = length(ff_name)
f_dest_path = 'DD0:'||right(ff_name,ff_name_len-4)
dest_path_len = index(f_dest_path,'/') - 1
dest_path = left(f_dest_path,dest_path_len)
copy ff_name dest_path
end
call close('myfile')
end
else
say 'cant open file'
EXIT